home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
cstdio.arc
/
SRC.ARC
/
BRK.A
< prev
next >
Wrap
Text File
|
1984-08-01
|
508b
|
33 lines
; brk.a - change memory allocation.
; (C) Copyright 1984 Gregory R. Mansfield - All Rights Reserved
; G. R. Mansfield. 84/06/04.
; Ver 1.1-4801.
dseg
public _mcv
cseg
public brk_
public sbrk_
; int BYTE *brk(addr)
; BYTE *addr;
brk_: mov bx,sp ; set current address
mov ax,[bx+2]
brk1: mov _mcv+2,ax
ret
; int BYTE *sbrk(incr)
; unsigned incr;
sbrk_: mov bx,sp ; add increment to current address
mov cx,[bx+2]
mov ax,_mcv+2
add cx,ax
mov _mcv+2,cx
ret